﻿using Super_Management_Mayhem.Content.Spritesheet.Player;
using Transformable_Engine_v2.Engine.Animation.FrameAnimation;

namespace Super_Management_Mayhem.Content.Animations.Native
{
    #region Attack animations

    public class AttackDownState : FrameAnimationDescription
    {
        public static int Duration
        {
            get
            {
                return (int) (1000.0f / Framerate * 5);
            }
        }

        public static int Framerate
        {
            get
            {
                return 15;
            }
        }

        public AttackDownState()
        {
            IsLooping = false;
            AddFrame(0, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackDownState.Attack0), 1));
            AddFrame(1, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackDownState.Attack1), 2));
            AddFrame(2, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackDownState.Attack2), 3));
            AddFrame(3, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackDownState.Attack3), 4));
            AddFrame(4, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackDownState.Attack4), 5) { IsLastFrame = true });
            FrameRate = Framerate;
        }
    }

    public class AttackUpState : FrameAnimationDescription
    {
        public static int Duration
        {
            get
            {
                return (int) (1000.0f / Framerate * 5);
            }
        }

        public static int Framerate
        {
            get
            {
                return 15;
            }
        }

        public AttackUpState()
        {
            IsLooping = false;
            AddFrame(0, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackUpState.Attack0), 1));
            AddFrame(1, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackUpState.Attack1), 2));
            AddFrame(2, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackUpState.Attack2), 3));
            AddFrame(3, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackUpState.Attack3), 4));
            AddFrame(4, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackUpState.Attack4), 5) { IsLastFrame = true });
            FrameRate = Framerate;
        }
    }

    public class AttackRightState : FrameAnimationDescription
    {
        public static int Duration
        {
            get
            {
                return (int) (1000.0f / Framerate * 5);
            }
        }

        public static int Framerate
        {
            get
            {
                return 15;
            }
        }

        public AttackRightState()
        {
            IsLooping = false;
            AddFrame(0, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackRightState.Attack0), 1));
            AddFrame(1, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackRightState.Attack1), 2));
            AddFrame(2, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackRightState.Attack2), 3));
            AddFrame(3, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackRightState.Attack3), 4));
            AddFrame(4, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackRightState.Attack4), 5) { IsLastFrame = true });
            FrameRate = Framerate;
        }
    }

    public class AttackLeftState : FrameAnimationDescription
    {
        public static int Duration
        {
            get
            {
                return (int) (1000.0f / Framerate * 5);
            }
        }

        public static int Framerate
        {
            get
            {
                return 15;
            }
        }

        public AttackLeftState()
        {
            IsLooping = false;
            AddFrame(0, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackLeftState.Attack0), 1));
            AddFrame(1, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackLeftState.Attack1), 2));
            AddFrame(2, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackLeftState.Attack2), 3));
            AddFrame(3, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackLeftState.Attack3), 4));
            AddFrame(4, new FrameDescription(NativeSheet.GetSprite(NativeSheet.AttackLeftState.Attack4), 5) { IsLastFrame = true });
            FrameRate = Framerate;
        }
    }

    #endregion
}
